package com.varian.tool.contant;

import cn.hutool.http.HttpStatus;
import com.varian.tool.result.Result;

/**
 * @author ben
 * @since 2024/6/22
 */
public interface ResultConstant {

    String R_STATUS = "status";
    String R_CODE = "code";
    String R_MESSAGE = "message";
    String R_DATA = "data";
    String R_SUCCESS = "success";

    Result OK = Result.of(HttpStatus.HTTP_OK, "操作成功");
    Result FAIL = Result.of(HttpStatus.HTTP_BAD_REQUEST, "操作失败");
    Result UNAUTHORIZED = Result.of(HttpStatus.HTTP_UNAUTHORIZED, "未授权");
    Result AUTHENTICATION_EXPIRED = Result.of(HttpStatus.HTTP_UNAUTHORIZED, "认证过期");
    Result NOT_FOUND = Result.of(HttpStatus.HTTP_NOT_FOUND, "未找到");
    Result FORBIDDEN = Result.of(HttpStatus.HTTP_FORBIDDEN, "无权限");
    Result SERVICE_ERROR = Result.of(HttpStatus.HTTP_INTERNAL_ERROR, "服务异常");
    Result I_AM_TEAPOT = Result.of(HttpStatus.HTTP_I_AM_A_TEAPOT, "I'm a teapot");
    Result UNKNOWN_ERROR = Result.of(HttpStatus.HTTP_INTERNAL_ERROR, "未知错误");


    String OK_CODE = "0";
    String FAIL_CODE = "9999";
}
